﻿using EasyLinkerSDK.Enum;
using EasyLinkerSDK.Model.Server.Common.Interface;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Text;

namespace EasyLinkerSDK.Model.Server.Common.ServerMessage
{
    public class ServerMessage : IServerMessage
    {
        [JsonConverter(typeof(StringEnumConverter))]
        public ServerDeviceType Device { get; set; }

        public string Uid { get; set; }

        [JsonConverter(typeof(StringEnumConverter))]
        public MessageType Type { get; set; }

        [JsonConverter(typeof(StringEnumConverter))]
        public ActionName Action { get; set; }

        public string MessageId { get; set; }

        public string DeviceId { get; set; }

        public int Time { get; set; }

        public int Version { get; set; }

        public ServerMessageData Data { get; set; }
    }
}
